<%@ Page Language="C#" Theme="Defaultsys" AutoEventWireup="true" CodeFile="CallFinishedList.aspx.cs"
    Inherits="CallFinishedList" Title="Rapport Plan System - Call finished list"
    MasterPageFile="~/MasterPage.master" %>

<%@ MasterType VirtualPath="~/MasterPage.master" %>
<asp:Content runat="server" ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1">
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
        <tr>
            <td class="contTable">
                <asp:GridView ID="grdCalls" SkinID="gvGrid" runat="server" AutoGenerateColumns="false"
                    OnRowCommand="Command" Width="100%" AllowPaging="true" OnPageIndexChanging="grdCalls_PageIndexChanging">
                    <Columns>
                        <asp:TemplateField HeaderText="ID" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <%# Container.DataItemIndex + 1 %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText="Contact" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">
                            <ItemTemplate>
                                <asp:HyperLink ID="idContact" runat="server" 
                                    NavigateUrl='<%# "Contact.aspx?id="+Global.EncryptString(Eval("ContactId").ToString())%>'>
                                    <%# Eval("Name")%></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                            
                        <asp:BoundField HeaderText="Phone" DataField="Phone" SortExpression="Phone" 
                            HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"/>
                            
                        <asp:BoundField HeaderText="Mobile phone" DataField="MobilePhone" SortExpression="MobilePhone"
                            HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" />
                            
                        <asp:TemplateField HeaderText="View Details" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Button ID="btnDetails" runat="server" Text="View Details" CommandArgument='<%# Eval("CallId") %>' />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                        There are currently no finished calls.</EmptyDataTemplate>
                    <PagerStyle VerticalAlign="Middle" HorizontalAlign="Left" Wrap="False" CssClass="paging"
                        Font-Bold="True"></PagerStyle>
                    <PagerSettings Mode="NumericFirstLast" />
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>
